extends "../i_TD_harp/i_TD_harp.gd"
func init():
	.init()
	name = "圣光竖琴"
	resetdata()
	info = info + "圣光射线：向我方生命最低的的单位发射治疗射线，对其治疗<88 + 12%自身血量上限>(最高500)点血量，并为路径上所有友军治疗\n其一半治疗量[cd:3秒]"

#技能计时
func _upS():
	._upS()
	cnt2 += 1
	if cnt2 == 3:
		cnt2 = 0
		lhmy()

func lhmy():
	cell = masCha.cell
	var chas = masCha.getAllChas(2)
	chas.sort_custom(self,"sort2")
	var chas2 = utils.lineChas(cell,chas[0].cell,10)
	chas2.erase(chas[0])
	var val = min(500,88 + masCha.att.maxHp * 0.12)
	masCha.healCha(chas[0],val)
	for i in chas2:
		if i.team == masCha.team:
			masCha.healCha(i,val*0.5)

func sort2(a,b):
	return a.att.hp < b.att.hp